package com.etc.controller;

import com.etc.service.HistoryOfService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/HistoryOfController")
public class HistoryOfController {

    Logger logger= Logger.getLogger(HistoryOfController.class);

    @Autowired
    HistoryOfService service;


    @RequestMapping("/addHistory")
    @ResponseBody
    public boolean addHistory(String userId,Integer videoId){
        logger.debug("这是userId:"+userId);
        logger.debug("这是videoId:"+videoId);
        return service.addHistory(userId,videoId);

    }

    @RequestMapping("/deleteHistory")
    @ResponseBody
    public boolean deleteHistory(String userId,Integer videoId){
        return service.deleteHistory(userId,videoId);

    }

}
